package com.qianxun.module.base.bo;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 用户信息
 * @author: huwei
 * @date:   2020/2/5 14:31
 * @version:  1.0.0
*/
@Data
@Accessors(chain = true)
public class UserInfo {

    private Long id;
    /**
     * 名称，昵称
     */
    private String nickname;
    /**
     * 用户编码，字符串标识符
     */
    private String userKey;
    /**
     * 用户名
     */
    private String username;

    public UserInfo(Long id, String nickname, String userKey, String username) {
        this.id = id;
        this.nickname = nickname;
        this.userKey = userKey;
        this.username = username;
    }

    /**
     * 系统用户
     * @return
     */
    public static UserInfo systemUserInfo(){
        return new UserInfo(0L ,"system" ,"0" ,"system");
    }
}